import java.io.*;
import java.util.Arrays;
import java.util.Collections;
import java.text.Normalizer;

class FileBench {
	public final int blockSize;

	public FileBench(int bs) {
		blockSize = bs;
	}

	public long read(String inF) throws IOException {
		FileInputStream fis = new FileInputStream(inF);
		byte[] tmp = new byte[blockSize];
		long tick = System.currentTimeMillis();
		while (fis.available() != 0)
			fis.read(tmp);
		fis.close();
		return System.currentTimeMillis()-tick;
	}

	public static void main(String[] arg) {
		try {
			for (int i=1; i<=4096; i<<=1) {
				FileBench fb = new FileBench(i);
				System.out.println(i+" bytes, "+fb.read("serie3.pdf")+" ms");
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
